package cn.hnucm.orderservice.service;

import cn.hnucm.orderservice.entity.TbGoodsOrder;
import cn.hnucm.vo.AddOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author chenjintao
 * @since 2021-12-06 ${time}
 */
@Service
public interface TbGoodsOrderService extends IService<TbGoodsOrder> {

    //根据订单ID获取订单
    TbGoodsOrder getOrderById(Integer orderId);
    //获取有关于某商品的所有订单
    List<TbGoodsOrder> getAboutGoodAllOrder(Integer goodsId);
    //获取某人的所有订单
    List<TbGoodsOrder> getOneUserAllOrder(Integer userId);
    //获取某人卖出的商品的所有订单
    List<TbGoodsOrder> getOneUserSellerOrder(Integer userId);

    //获取某人买来的商品的所有订单
    List<TbGoodsOrder> getOneUserbuyOrder(Integer userId);

    //获取某人未付款的订单
    List<TbGoodsOrder> getNoPayOrder(Integer userId);
    //获取某人已付款的订单
    List<TbGoodsOrder> getPayOrder(Integer userId);
    //获取某人已送达的订单
    List<TbGoodsOrder> getSendOrder(Integer userId);
    //获取某人已经结束的订单
    List<TbGoodsOrder> getOverOrder(Integer userId);

    //获取某人某段时间的所有订单
    List<TbGoodsOrder> getOneTimeOrder(Integer userId,String beginTime,String endTime);

    //增加一条订单
    TbGoodsOrder addOrder(AddOrder addOrder);
    //订单已完成
    Boolean overOrder(Integer orderId);
    //通过id删除一条订单
    Boolean deleteOrderById(Integer orderId);



}
